package com.smasher.component.activity

import android.util.Log
import android.view.View
import com.smasher.component.databinding.ActivityDemoBinding
import com.smasher.net.connect.NetConnectManager
import com.smasher.widget.base.BaseActivity

class DemoActivity : BaseActivity() {
    private lateinit var mBinding: ActivityDemoBinding

    /**
     * 进行获取根部的View
     *
     * @return RootView
     */
    override fun getRootView(): View {
        mBinding = ActivityDemoBinding.inflate(layoutInflater)
        return mBinding.root
    }

    /**
     * 进行初始化相关的View
     */
    override fun initView() {
        NetConnectManager.addNetTypeChangeListener {
            Log.i(TAG, "initView: $it")
        }
        NetConnectManager.addNetStatusChangeListener {
            Log.i(TAG, "initView: $it")
        }
    }

    /**
     * 进行初始化相关的数据
     */
    override fun initData() {
    }

    companion object {
        const val TAG = "Demo"
    }
}
